1 module gles.gl2;
2 extern (C):
3 
4 enum __gles2_gl2_h_ = 1;
5 
6 /*
7 ** Copyright (c) 2013-2018 The Khronos Group Inc.
8 **
9 ** Permission is hereby granted, free of charge, to any person obtaining a
10 ** copy of this software and/or associated documentation files (the
11 ** "Materials"), to deal in the Materials without restriction, including
12 ** without limitation the rights to use, copy, modify, merge, publish,
13 ** distribute, sublicense, and/or sell copies of the Materials, and to
14 ** permit persons to whom the Materials are furnished to do so, subject to
15 ** the following conditions:
16 **
17 ** The above copyright notice and this permission notice shall be included
18 ** in all copies or substantial portions of the Materials.
19 **
20 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
27 */
28 /*
29 ** This header is generated from the Khronos OpenGL / OpenGL ES XML
30 ** API Registry. The current version of the Registry, generator scripts
31 ** used to make the header, and the header can be found at
32 **   https://github.com/KhronosGroup/OpenGL-Registry
33 */
34 
35 enum GL_GLES_PROTOTYPES = 1;
36 
37 /* Generated on date 20200423 */
38 
39 /* Generated C header for:
40  * API: gles2
41  * Profile: common
42  * Versions considered: 2\.[0-9]
43  * Versions emitted: .*
44  * Default extensions included: None
45  * Additional extensions included: _nomatch_^
46  * Extensions removed: _nomatch_^
47  */
48 
49 enum GL_ES_VERSION_2_0 = 1;
50 
51 alias GLbyte = char;
52 alias GLclampf = float;
53 alias GLfixed = int;
54 alias GLshort = short;
55 alias GLushort = ushort;
56 alias GLvoid = void;
57 struct __GLsync;
58 alias GLsync = __GLsync*;
59 alias GLint64 = long;
60 alias GLuint64 = ulong;
61 alias GLenum = uint;
62 alias GLuint = uint;
63 alias GLchar = char;
64 alias GLfloat = float;
65 alias GLsizeiptr = size_t;
66 alias GLintptr = ptrdiff_t;
67 alias GLbitfield = uint;
68 alias GLint = int;
69 alias GLboolean = ubyte;
70 alias GLsizei = int;
71 alias GLubyte = ubyte;
72 enum GL_DEPTH_BUFFER_BIT = 0x00000100;
73 enum GL_STENCIL_BUFFER_BIT = 0x00000400;
74 enum GL_COLOR_BUFFER_BIT = 0x00004000;
75 enum GL_FALSE = 0;
76 enum GL_TRUE = 1;
77 enum GL_POINTS = 0x0000;
78 enum GL_LINES = 0x0001;
79 enum GL_LINE_LOOP = 0x0002;
80 enum GL_LINE_STRIP = 0x0003;
81 enum GL_TRIANGLES = 0x0004;
82 enum GL_TRIANGLE_STRIP = 0x0005;
83 enum GL_TRIANGLE_FAN = 0x0006;
84 enum GL_ZERO = 0;
85 enum GL_ONE = 1;
86 enum GL_SRC_COLOR = 0x0300;
87 enum GL_ONE_MINUS_SRC_COLOR = 0x0301;
88 enum GL_SRC_ALPHA = 0x0302;
89 enum GL_ONE_MINUS_SRC_ALPHA = 0x0303;
90 enum GL_DST_ALPHA = 0x0304;
91 enum GL_ONE_MINUS_DST_ALPHA = 0x0305;
92 enum GL_DST_COLOR = 0x0306;
93 enum GL_ONE_MINUS_DST_COLOR = 0x0307;
94 enum GL_SRC_ALPHA_SATURATE = 0x0308;
95 enum GL_FUNC_ADD = 0x8006;
96 enum GL_BLEND_EQUATION = 0x8009;
97 enum GL_BLEND_EQUATION_RGB = 0x8009;
98 enum GL_BLEND_EQUATION_ALPHA = 0x883D;
99 enum GL_FUNC_SUBTRACT = 0x800A;
100 enum GL_FUNC_REVERSE_SUBTRACT = 0x800B;
101 enum GL_BLEND_DST_RGB = 0x80C8;
102 enum GL_BLEND_SRC_RGB = 0x80C9;
103 enum GL_BLEND_DST_ALPHA = 0x80CA;
104 enum GL_BLEND_SRC_ALPHA = 0x80CB;
105 enum GL_CONSTANT_COLOR = 0x8001;
106 enum GL_ONE_MINUS_CONSTANT_COLOR = 0x8002;
107 enum GL_CONSTANT_ALPHA = 0x8003;
108 enum GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004;
109 enum GL_BLEND_COLOR = 0x8005;
110 enum GL_ARRAY_BUFFER = 0x8892;
111 enum GL_ELEMENT_ARRAY_BUFFER = 0x8893;
112 enum GL_ARRAY_BUFFER_BINDING = 0x8894;
113 enum GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
114 enum GL_STREAM_DRAW = 0x88E0;
115 enum GL_STATIC_DRAW = 0x88E4;
116 enum GL_DYNAMIC_DRAW = 0x88E8;
117 enum GL_BUFFER_SIZE = 0x8764;
118 enum GL_BUFFER_USAGE = 0x8765;
119 enum GL_CURRENT_VERTEX_ATTRIB = 0x8626;
120 enum GL_FRONT = 0x0404;
121 enum GL_BACK = 0x0405;
122 enum GL_FRONT_AND_BACK = 0x0408;
123 enum GL_TEXTURE_2D = 0x0DE1;
124 enum GL_CULL_FACE = 0x0B44;
125 enum GL_BLEND = 0x0BE2;
126 enum GL_DITHER = 0x0BD0;
127 enum GL_STENCIL_TEST = 0x0B90;
128 enum GL_DEPTH_TEST = 0x0B71;
129 enum GL_SCISSOR_TEST = 0x0C11;
130 enum GL_POLYGON_OFFSET_FILL = 0x8037;
131 enum GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
132 enum GL_SAMPLE_COVERAGE = 0x80A0;
133 enum GL_NO_ERROR = 0;
134 enum GL_INVALID_ENUM = 0x0500;
135 enum GL_INVALID_VALUE = 0x0501;
136 enum GL_INVALID_OPERATION = 0x0502;
137 enum GL_OUT_OF_MEMORY = 0x0505;
138 enum GL_CW = 0x0900;
139 enum GL_CCW = 0x0901;
140 enum GL_LINE_WIDTH = 0x0B21;
141 enum GL_ALIASED_POINT_SIZE_RANGE = 0x846D;
142 enum GL_ALIASED_LINE_WIDTH_RANGE = 0x846E;
143 enum GL_CULL_FACE_MODE = 0x0B45;
144 enum GL_FRONT_FACE = 0x0B46;
145 enum GL_DEPTH_RANGE = 0x0B70;
146 enum GL_DEPTH_WRITEMASK = 0x0B72;
147 enum GL_DEPTH_CLEAR_VALUE = 0x0B73;
148 enum GL_DEPTH_FUNC = 0x0B74;
149 enum GL_STENCIL_CLEAR_VALUE = 0x0B91;
150 enum GL_STENCIL_FUNC = 0x0B92;
151 enum GL_STENCIL_FAIL = 0x0B94;
152 enum GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95;
153 enum GL_STENCIL_PASS_DEPTH_PASS = 0x0B96;
154 enum GL_STENCIL_REF = 0x0B97;
155 enum GL_STENCIL_VALUE_MASK = 0x0B93;
156 enum GL_STENCIL_WRITEMASK = 0x0B98;
157 enum GL_STENCIL_BACK_FUNC = 0x8800;
158 enum GL_STENCIL_BACK_FAIL = 0x8801;
159 enum GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
160 enum GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
161 enum GL_STENCIL_BACK_REF = 0x8CA3;
162 enum GL_STENCIL_BACK_VALUE_MASK = 0x8CA4;
163 enum GL_STENCIL_BACK_WRITEMASK = 0x8CA5;
164 enum GL_VIEWPORT = 0x0BA2;
165 enum GL_SCISSOR_BOX = 0x0C10;
166 enum GL_COLOR_CLEAR_VALUE = 0x0C22;
167 enum GL_COLOR_WRITEMASK = 0x0C23;
168 enum GL_UNPACK_ALIGNMENT = 0x0CF5;
169 enum GL_PACK_ALIGNMENT = 0x0D05;
170 enum GL_MAX_TEXTURE_SIZE = 0x0D33;
171 enum GL_MAX_VIEWPORT_DIMS = 0x0D3A;
172 enum GL_SUBPIXEL_BITS = 0x0D50;
173 enum GL_RED_BITS = 0x0D52;
174 enum GL_GREEN_BITS = 0x0D53;
175 enum GL_BLUE_BITS = 0x0D54;
176 enum GL_ALPHA_BITS = 0x0D55;
177 enum GL_DEPTH_BITS = 0x0D56;
178 enum GL_STENCIL_BITS = 0x0D57;
179 enum GL_POLYGON_OFFSET_UNITS = 0x2A00;
180 enum GL_POLYGON_OFFSET_FACTOR = 0x8038;
181 enum GL_TEXTURE_BINDING_2D = 0x8069;
182 enum GL_SAMPLE_BUFFERS = 0x80A8;
183 enum GL_SAMPLES = 0x80A9;
184 enum GL_SAMPLE_COVERAGE_VALUE = 0x80AA;
185 enum GL_SAMPLE_COVERAGE_INVERT = 0x80AB;
186 enum GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;
187 enum GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3;
188 enum GL_DONT_CARE = 0x1100;
189 enum GL_FASTEST = 0x1101;
190 enum GL_NICEST = 0x1102;
191 enum GL_GENERATE_MIPMAP_HINT = 0x8192;
192 enum GL_BYTE = 0x1400;
193 enum GL_UNSIGNED_BYTE = 0x1401;
194 enum GL_SHORT = 0x1402;
195 enum GL_UNSIGNED_SHORT = 0x1403;
196 enum GL_INT = 0x1404;
197 enum GL_UNSIGNED_INT = 0x1405;
198 enum GL_FLOAT = 0x1406;
199 enum GL_FIXED = 0x140C;
200 enum GL_DEPTH_COMPONENT = 0x1902;
201 enum GL_ALPHA = 0x1906;
202 enum GL_RGB = 0x1907;
203 enum GL_RGBA = 0x1908;
204 enum GL_LUMINANCE = 0x1909;
205 enum GL_LUMINANCE_ALPHA = 0x190A;
206 enum GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033;
207 enum GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034;
208 enum GL_UNSIGNED_SHORT_5_6_5 = 0x8363;
209 enum GL_FRAGMENT_SHADER = 0x8B30;
210 enum GL_VERTEX_SHADER = 0x8B31;
211 enum GL_MAX_VERTEX_ATTRIBS = 0x8869;
212 enum GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
213 enum GL_MAX_VARYING_VECTORS = 0x8DFC;
214 enum GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
215 enum GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
216 enum GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872;
217 enum GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
218 enum GL_SHADER_TYPE = 0x8B4F;
219 enum GL_DELETE_STATUS = 0x8B80;
220 enum GL_LINK_STATUS = 0x8B82;
221 enum GL_VALIDATE_STATUS = 0x8B83;
222 enum GL_ATTACHED_SHADERS = 0x8B85;
223 enum GL_ACTIVE_UNIFORMS = 0x8B86;
224 enum GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87;
225 enum GL_ACTIVE_ATTRIBUTES = 0x8B89;
226 enum GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A;
227 enum GL_SHADING_LANGUAGE_VERSION = 0x8B8C;
228 enum GL_CURRENT_PROGRAM = 0x8B8D;
229 enum GL_NEVER = 0x0200;
230 enum GL_LESS = 0x0201;
231 enum GL_EQUAL = 0x0202;
232 enum GL_LEQUAL = 0x0203;
233 enum GL_GREATER = 0x0204;
234 enum GL_NOTEQUAL = 0x0205;
235 enum GL_GEQUAL = 0x0206;
236 enum GL_ALWAYS = 0x0207;
237 enum GL_KEEP = 0x1E00;
238 enum GL_REPLACE = 0x1E01;
239 enum GL_INCR = 0x1E02;
240 enum GL_DECR = 0x1E03;
241 enum GL_INVERT = 0x150A;
242 enum GL_INCR_WRAP = 0x8507;
243 enum GL_DECR_WRAP = 0x8508;
244 enum GL_VENDOR = 0x1F00;
245 enum GL_RENDERER = 0x1F01;
246 enum GL_VERSION = 0x1F02;
247 enum GL_EXTENSIONS = 0x1F03;
248 enum GL_NEAREST = 0x2600;
249 enum GL_LINEAR = 0x2601;
250 enum GL_NEAREST_MIPMAP_NEAREST = 0x2700;
251 enum GL_LINEAR_MIPMAP_NEAREST = 0x2701;
252 enum GL_NEAREST_MIPMAP_LINEAR = 0x2702;
253 enum GL_LINEAR_MIPMAP_LINEAR = 0x2703;
254 enum GL_TEXTURE_MAG_FILTER = 0x2800;
255 enum GL_TEXTURE_MIN_FILTER = 0x2801;
256 enum GL_TEXTURE_WRAP_S = 0x2802;
257 enum GL_TEXTURE_WRAP_T = 0x2803;
258 enum GL_TEXTURE = 0x1702;
259 enum GL_TEXTURE_CUBE_MAP = 0x8513;
260 enum GL_TEXTURE_BINDING_CUBE_MAP = 0x8514;
261 enum GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
262 enum GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
263 enum GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
264 enum GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
265 enum GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
266 enum GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
267 enum GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
268 enum GL_TEXTURE0 = 0x84C0;
269 enum GL_TEXTURE1 = 0x84C1;
270 enum GL_TEXTURE2 = 0x84C2;
271 enum GL_TEXTURE3 = 0x84C3;
272 enum GL_TEXTURE4 = 0x84C4;
273 enum GL_TEXTURE5 = 0x84C5;
274 enum GL_TEXTURE6 = 0x84C6;
275 enum GL_TEXTURE7 = 0x84C7;
276 enum GL_TEXTURE8 = 0x84C8;
277 enum GL_TEXTURE9 = 0x84C9;
278 enum GL_TEXTURE10 = 0x84CA;
279 enum GL_TEXTURE11 = 0x84CB;
280 enum GL_TEXTURE12 = 0x84CC;
281 enum GL_TEXTURE13 = 0x84CD;
282 enum GL_TEXTURE14 = 0x84CE;
283 enum GL_TEXTURE15 = 0x84CF;
284 enum GL_TEXTURE16 = 0x84D0;
285 enum GL_TEXTURE17 = 0x84D1;
286 enum GL_TEXTURE18 = 0x84D2;
287 enum GL_TEXTURE19 = 0x84D3;
288 enum GL_TEXTURE20 = 0x84D4;
289 enum GL_TEXTURE21 = 0x84D5;
290 enum GL_TEXTURE22 = 0x84D6;
291 enum GL_TEXTURE23 = 0x84D7;
292 enum GL_TEXTURE24 = 0x84D8;
293 enum GL_TEXTURE25 = 0x84D9;
294 enum GL_TEXTURE26 = 0x84DA;
295 enum GL_TEXTURE27 = 0x84DB;
296 enum GL_TEXTURE28 = 0x84DC;
297 enum GL_TEXTURE29 = 0x84DD;
298 enum GL_TEXTURE30 = 0x84DE;
299 enum GL_TEXTURE31 = 0x84DF;
300 enum GL_ACTIVE_TEXTURE = 0x84E0;
301 enum GL_REPEAT = 0x2901;
302 enum GL_CLAMP_TO_EDGE = 0x812F;
303 enum GL_MIRRORED_REPEAT = 0x8370;
304 enum GL_FLOAT_VEC2 = 0x8B50;
305 enum GL_FLOAT_VEC3 = 0x8B51;
306 enum GL_FLOAT_VEC4 = 0x8B52;
307 enum GL_INT_VEC2 = 0x8B53;
308 enum GL_INT_VEC3 = 0x8B54;
309 enum GL_INT_VEC4 = 0x8B55;
310 enum GL_BOOL = 0x8B56;
311 enum GL_BOOL_VEC2 = 0x8B57;
312 enum GL_BOOL_VEC3 = 0x8B58;
313 enum GL_BOOL_VEC4 = 0x8B59;
314 enum GL_FLOAT_MAT2 = 0x8B5A;
315 enum GL_FLOAT_MAT3 = 0x8B5B;
316 enum GL_FLOAT_MAT4 = 0x8B5C;
317 enum GL_SAMPLER_2D = 0x8B5E;
318 enum GL_SAMPLER_CUBE = 0x8B60;
319 enum GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
320 enum GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
321 enum GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
322 enum GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
323 enum GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
324 enum GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
325 enum GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
326 enum GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
327 enum GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
328 enum GL_COMPILE_STATUS = 0x8B81;
329 enum GL_INFO_LOG_LENGTH = 0x8B84;
330 enum GL_SHADER_SOURCE_LENGTH = 0x8B88;
331 enum GL_SHADER_COMPILER = 0x8DFA;
332 enum GL_SHADER_BINARY_FORMATS = 0x8DF8;
333 enum GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9;
334 enum GL_LOW_FLOAT = 0x8DF0;
335 enum GL_MEDIUM_FLOAT = 0x8DF1;
336 enum GL_HIGH_FLOAT = 0x8DF2;
337 enum GL_LOW_INT = 0x8DF3;
338 enum GL_MEDIUM_INT = 0x8DF4;
339 enum GL_HIGH_INT = 0x8DF5;
340 enum GL_FRAMEBUFFER = 0x8D40;
341 enum GL_RENDERBUFFER = 0x8D41;
342 enum GL_RGBA4 = 0x8056;
343 enum GL_RGB5_A1 = 0x8057;
344 enum GL_RGB565 = 0x8D62;
345 enum GL_DEPTH_COMPONENT16 = 0x81A5;
346 enum GL_STENCIL_INDEX8 = 0x8D48;
347 enum GL_RENDERBUFFER_WIDTH = 0x8D42;
348 enum GL_RENDERBUFFER_HEIGHT = 0x8D43;
349 enum GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
350 enum GL_RENDERBUFFER_RED_SIZE = 0x8D50;
351 enum GL_RENDERBUFFER_GREEN_SIZE = 0x8D51;
352 enum GL_RENDERBUFFER_BLUE_SIZE = 0x8D52;
353 enum GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53;
354 enum GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54;
355 enum GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55;
356 enum GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
357 enum GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
358 enum GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
359 enum GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
360 enum GL_COLOR_ATTACHMENT0 = 0x8CE0;
361 enum GL_DEPTH_ATTACHMENT = 0x8D00;
362 enum GL_STENCIL_ATTACHMENT = 0x8D20;
363 enum GL_NONE = 0;
364 enum GL_FRAMEBUFFER_COMPLETE = 0x8CD5;
365 enum GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
366 enum GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
367 enum GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
368 enum GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
369 enum GL_FRAMEBUFFER_BINDING = 0x8CA6;
370 enum GL_RENDERBUFFER_BINDING = 0x8CA7;
371 enum GL_MAX_RENDERBUFFER_SIZE = 0x84E8;
372 enum GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506;
373 alias PFNGLACTIVETEXTUREPROC = void function (GLenum texture);
374 alias PFNGLATTACHSHADERPROC = void function (GLuint program, GLuint shader);
375 alias PFNGLBINDATTRIBLOCATIONPROC = void function (GLuint program, GLuint index, GLchar* name);
376 alias PFNGLBINDBUFFERPROC = void function (GLenum target, GLuint buffer);
377 alias PFNGLBINDFRAMEBUFFERPROC = void function (GLenum target, GLuint framebuffer);
378 alias PFNGLBINDRENDERBUFFERPROC = void function (GLenum target, GLuint renderbuffer);
379 alias PFNGLBINDTEXTUREPROC = void function (GLenum target, GLuint texture);
380 alias PFNGLBLENDCOLORPROC = void function (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
381 alias PFNGLBLENDEQUATIONPROC = void function (GLenum mode);
382 alias PFNGLBLENDEQUATIONSEPARATEPROC = void function (GLenum modeRGB, GLenum modeAlpha);
383 alias PFNGLBLENDFUNCPROC = void function (GLenum sfactor, GLenum dfactor);
384 alias PFNGLBLENDFUNCSEPARATEPROC = void function (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
385 alias PFNGLBUFFERDATAPROC = void function (GLenum target, GLsizeiptr size, void* data, GLenum usage);
386 alias PFNGLBUFFERSUBDATAPROC = void function (GLenum target, GLintptr offset, GLsizeiptr size, const(void)* data);
387 alias PFNGLCHECKFRAMEBUFFERSTATUSPROC = uint function (GLenum target);
388 alias PFNGLCLEARPROC = void function (GLbitfield mask);
389 alias PFNGLCLEARCOLORPROC = void function (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
390 alias PFNGLCLEARDEPTHFPROC = void function (GLfloat d);
391 alias PFNGLCLEARSTENCILPROC = void function (GLint s);
392 alias PFNGLCOLORMASKPROC = void function (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
393 alias PFNGLCOMPILESHADERPROC = void function (GLuint shader);
394 alias PFNGLCOMPRESSEDTEXIMAGE2DPROC = void function (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, void* data);
395 alias PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC = void function (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, void* data);
396 alias PFNGLCOPYTEXIMAGE2DPROC = void function (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
397 alias PFNGLCOPYTEXSUBIMAGE2DPROC = void function (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
398 alias PFNGLCREATEPROGRAMPROC = uint function ();
399 alias PFNGLCREATESHADERPROC = uint function (GLenum type);
400 alias PFNGLCULLFACEPROC = void function (GLenum mode);
401 alias PFNGLDELETEBUFFERSPROC = void function (GLsizei n, GLuint* buffers);
402 alias PFNGLDELETEFRAMEBUFFERSPROC = void function (GLsizei n, GLuint* framebuffers);
403 alias PFNGLDELETEPROGRAMPROC = void function (GLuint program);
404 alias PFNGLDELETERENDERBUFFERSPROC = void function (GLsizei n, GLuint* renderbuffers);
405 alias PFNGLDELETESHADERPROC = void function (GLuint shader);
406 alias PFNGLDELETETEXTURESPROC = void function (GLsizei n, GLuint* textures);
407 alias PFNGLDEPTHFUNCPROC = void function (GLenum func);
408 alias PFNGLDEPTHMASKPROC = void function (GLboolean flag);
409 alias PFNGLDEPTHRANGEFPROC = void function (GLfloat n, GLfloat f);
410 alias PFNGLDETACHSHADERPROC = void function (GLuint program, GLuint shader);
411 alias PFNGLDISABLEPROC = void function (GLenum cap);
412 alias PFNGLDISABLEVERTEXATTRIBARRAYPROC = void function (GLuint index);
413 alias PFNGLDRAWARRAYSPROC = void function (GLenum mode, GLint first, GLsizei count);
414 alias PFNGLDRAWELEMENTSPROC = void function (GLenum mode, GLsizei count, GLenum type, void* indices);
415 alias PFNGLENABLEPROC = void function (GLenum cap);
416 alias PFNGLENABLEVERTEXATTRIBARRAYPROC = void function (GLuint index);
417 alias PFNGLFINISHPROC = void function ();
418 alias PFNGLFLUSHPROC = void function ();
419 alias PFNGLFRAMEBUFFERRENDERBUFFERPROC = void function (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
420 alias PFNGLFRAMEBUFFERTEXTURE2DPROC = void function (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
421 alias PFNGLFRONTFACEPROC = void function (GLenum mode);
422 alias PFNGLGENBUFFERSPROC = void function (GLsizei n, GLuint* buffers);
423 alias PFNGLGENERATEMIPMAPPROC = void function (GLenum target);
424 alias PFNGLGENFRAMEBUFFERSPROC = void function (GLsizei n, GLuint* framebuffers);
425 alias PFNGLGENRENDERBUFFERSPROC = void function (GLsizei n, GLuint* renderbuffers);
426 alias PFNGLGENTEXTURESPROC = void function (GLsizei n, GLuint* textures);
427 alias PFNGLGETACTIVEATTRIBPROC = void function (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
428 alias PFNGLGETACTIVEUNIFORMPROC = void function (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
429 alias PFNGLGETATTACHEDSHADERSPROC = void function (GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders);
430 alias PFNGLGETATTRIBLOCATIONPROC = int function (GLuint program, GLchar* name);
431 alias PFNGLGETBOOLEANVPROC = void function (GLenum pname, GLboolean* data);
432 alias PFNGLGETBUFFERPARAMETERIVPROC = void function (GLenum target, GLenum pname, GLint* params);
433 alias PFNGLGETERRORPROC = uint function ();
434 alias PFNGLGETFLOATVPROC = void function (GLenum pname, GLfloat* data);
435 alias PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC = void function (GLenum target, GLenum attachment, GLenum pname, GLint* params);
436 alias PFNGLGETINTEGERVPROC = void function (GLenum pname, GLint* data);
437 alias PFNGLGETPROGRAMIVPROC = void function (GLuint program, GLenum pname, GLint* params);
438 alias PFNGLGETPROGRAMINFOLOGPROC = void function (GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
439 alias PFNGLGETRENDERBUFFERPARAMETERIVPROC = void function (GLenum target, GLenum pname, GLint* params);
440 alias PFNGLGETSHADERIVPROC = void function (GLuint shader, GLenum pname, GLint* params);
441 alias PFNGLGETSHADERINFOLOGPROC = void function (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
442 alias PFNGLGETSHADERPRECISIONFORMATPROC = void function (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
443 alias PFNGLGETSHADERSOURCEPROC = void function (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* source);
444 alias PFNGLGETSTRINGPROC = ubyte* function (GLenum name);
445 alias PFNGLGETTEXPARAMETERFVPROC = void function (GLenum target, GLenum pname, GLfloat* params);
446 alias PFNGLGETTEXPARAMETERIVPROC = void function (GLenum target, GLenum pname, GLint* params);
447 alias PFNGLGETUNIFORMFVPROC = void function (GLuint program, GLint location, GLfloat* params);
448 alias PFNGLGETUNIFORMIVPROC = void function (GLuint program, GLint location, GLint* params);
449 alias PFNGLGETUNIFORMLOCATIONPROC = int function (GLuint program, GLchar* name);
450 alias PFNGLGETVERTEXATTRIBFVPROC = void function (GLuint index, GLenum pname, GLfloat* params);
451 alias PFNGLGETVERTEXATTRIBIVPROC = void function (GLuint index, GLenum pname, GLint* params);
452 alias PFNGLGETVERTEXATTRIBPOINTERVPROC = void function (GLuint index, GLenum pname, void** pointer);
453 alias PFNGLHINTPROC = void function (GLenum target, GLenum mode);
454 alias PFNGLISBUFFERPROC = ubyte function (GLuint buffer);
455 alias PFNGLISENABLEDPROC = ubyte function (GLenum cap);
456 alias PFNGLISFRAMEBUFFERPROC = ubyte function (GLuint framebuffer);
457 alias PFNGLISPROGRAMPROC = ubyte function (GLuint program);
458 alias PFNGLISRENDERBUFFERPROC = ubyte function (GLuint renderbuffer);
459 alias PFNGLISSHADERPROC = ubyte function (GLuint shader);
460 alias PFNGLISTEXTUREPROC = ubyte function (GLuint texture);
461 alias PFNGLLINEWIDTHPROC = void function (GLfloat width);
462 alias PFNGLLINKPROGRAMPROC = void function (GLuint program);
463 alias PFNGLPIXELSTOREIPROC = void function (GLenum pname, GLint param);
464 alias PFNGLPOLYGONOFFSETPROC = void function (GLfloat factor, GLfloat units);
465 alias PFNGLREADPIXELSPROC = void function (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
466 alias PFNGLRELEASESHADERCOMPILERPROC = void function ();
467 alias PFNGLRENDERBUFFERSTORAGEPROC = void function (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
468 alias PFNGLSAMPLECOVERAGEPROC = void function (GLfloat value, GLboolean invert);
469 alias PFNGLSCISSORPROC = void function (GLint x, GLint y, GLsizei width, GLsizei height);
470 alias PFNGLSHADERBINARYPROC = void function (GLsizei count, GLuint* shaders, GLenum binaryformat, void* binary, GLsizei length);
471 alias PFNGLSHADERSOURCEPROC = void function (GLuint shader, GLsizei count, GLchar** string, GLint* length);
472 alias PFNGLSTENCILFUNCPROC = void function (GLenum func, GLint ref_, GLuint mask);
473 alias PFNGLSTENCILFUNCSEPARATEPROC = void function (GLenum face, GLenum func, GLint ref_, GLuint mask);
474 alias PFNGLSTENCILMASKPROC = void function (GLuint mask);
475 alias PFNGLSTENCILMASKSEPARATEPROC = void function (GLenum face, GLuint mask);
476 alias PFNGLSTENCILOPPROC = void function (GLenum fail, GLenum zfail, GLenum zpass);
477 alias PFNGLSTENCILOPSEPARATEPROC = void function (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
478 alias PFNGLTEXIMAGE2DPROC = void function (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, void* pixels);
479 alias PFNGLTEXPARAMETERFPROC = void function (GLenum target, GLenum pname, GLfloat param);
480 alias PFNGLTEXPARAMETERFVPROC = void function (GLenum target, GLenum pname, GLfloat* params);
481 alias PFNGLTEXPARAMETERIPROC = void function (GLenum target, GLenum pname, GLint param);
482 alias PFNGLTEXPARAMETERIVPROC = void function (GLenum target, GLenum pname, GLint* params);
483 alias PFNGLTEXSUBIMAGE2DPROC = void function (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
484 alias PFNGLUNIFORM1FPROC = void function (GLint location, GLfloat v0);
485 alias PFNGLUNIFORM1FVPROC = void function (GLint location, GLsizei count, GLfloat* value);
486 alias PFNGLUNIFORM1IPROC = void function (GLint location, GLint v0);
487 alias PFNGLUNIFORM1IVPROC = void function (GLint location, GLsizei count, GLint* value);
488 alias PFNGLUNIFORM2FPROC = void function (GLint location, GLfloat v0, GLfloat v1);
489 alias PFNGLUNIFORM2FVPROC = void function (GLint location, GLsizei count, GLfloat* value);
490 alias PFNGLUNIFORM2IPROC = void function (GLint location, GLint v0, GLint v1);
491 alias PFNGLUNIFORM2IVPROC = void function (GLint location, GLsizei count, GLint* value);
492 alias PFNGLUNIFORM3FPROC = void function (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
493 alias PFNGLUNIFORM3FVPROC = void function (GLint location, GLsizei count, GLfloat* value);
494 alias PFNGLUNIFORM3IPROC = void function (GLint location, GLint v0, GLint v1, GLint v2);
495 alias PFNGLUNIFORM3IVPROC = void function (GLint location, GLsizei count, GLint* value);
496 alias PFNGLUNIFORM4FPROC = void function (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
497 alias PFNGLUNIFORM4FVPROC = void function (GLint location, GLsizei count, GLfloat* value);
498 alias PFNGLUNIFORM4IPROC = void function (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
499 alias PFNGLUNIFORM4IVPROC = void function (GLint location, GLsizei count, GLint* value);
500 alias PFNGLUNIFORMMATRIX2FVPROC = void function (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
501 alias PFNGLUNIFORMMATRIX3FVPROC = void function (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
502 alias PFNGLUNIFORMMATRIX4FVPROC = void function (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
503 alias PFNGLUSEPROGRAMPROC = void function (GLuint program);
504 alias PFNGLVALIDATEPROGRAMPROC = void function (GLuint program);
505 alias PFNGLVERTEXATTRIB1FPROC = void function (GLuint index, GLfloat x);
506 alias PFNGLVERTEXATTRIB1FVPROC = void function (GLuint index, GLfloat* v);
507 alias PFNGLVERTEXATTRIB2FPROC = void function (GLuint index, GLfloat x, GLfloat y);
508 alias PFNGLVERTEXATTRIB2FVPROC = void function (GLuint index, GLfloat* v);
509 alias PFNGLVERTEXATTRIB3FPROC = void function (GLuint index, GLfloat x, GLfloat y, GLfloat z);
510 alias PFNGLVERTEXATTRIB3FVPROC = void function (GLuint index, GLfloat* v);
511 alias PFNGLVERTEXATTRIB4FPROC = void function (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
512 alias PFNGLVERTEXATTRIB4FVPROC = void function (GLuint index, GLfloat* v);
513 alias PFNGLVERTEXATTRIBPOINTERPROC = void function (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, void* pointer);
514 alias PFNGLVIEWPORTPROC = void function (GLint x, GLint y, GLsizei width, GLsizei height);
515 void glActiveTexture (GLenum texture);
516 void glAttachShader (GLuint program, GLuint shader);
517 version(WebAssembly)
518 {
519     void wglBindAttribLocation(GLuint program, GLuint index, size_t nameLen, const GLchar* namePtr);
520     void glBindAttribLocation(GLuint program ,GLuint index, const GLchar* name)
521     {
522         size_t length = 0;
523         while(name[length++] != '\0'){}
524         assert(length != 0, "Can't send a 0 length string to wglBindAttribLocation");
525         wglBindAttribLocation(program, index, length-1, name);
526     }
527 }
528 else
529 void glBindAttribLocation (GLuint program, GLuint index, GLchar* name);
530 void glBindBuffer (GLenum target, GLuint buffer);
531 void glBindFramebuffer (GLenum target, GLuint framebuffer);
532 void glBindRenderbuffer (GLenum target, GLuint renderbuffer);
533 void glBindTexture (GLenum target, GLuint texture);
534 void glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
535 void glBlendEquation (GLenum mode);
536 void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
537 void glBlendFunc (GLenum sfactor, GLenum dfactor);
538 void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
539 version(WebAssembly)
540 {
541     void glBufferData (GLenum target, GLuint size, void* data, GLenum usage);
542     void glBufferSubData (GLenum target, GLint offset, GLuint size, const(void)* data);
543 }
544 else
545 {
546     void glBufferData (GLenum target, GLsizeiptr size, void* data, GLenum usage);
547     void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const(void)* data);
548 }
549 GLenum glCheckFramebufferStatus (GLenum target);
550 void glClear (GLbitfield mask);
551 void glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
552 void glClearDepthf (GLfloat d);
553 void glClearStencil (GLint s);
554 void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
555 void glCompileShader (GLuint shader);
556 void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, void* data);
557 void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, void* data);
558 void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
559 void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
560 GLuint glCreateProgram ();
561 GLuint glCreateShader (GLenum type);
562 void glCullFace (GLenum mode);
563 version(WebAssembly)
564 {
565     void glDeleteBuffer(GLuint buffer);
566     void glDeleteBuffers (GLsizei n, GLuint* buffers)
567     {
568         assert(n == 1, "WebGL only allows deleting 1 buffer");
569         glDeleteBuffer(*buffers);
570         *buffers = 0;
571     }
572 }
573 else
574 {
575     void glDeleteBuffers (GLsizei n, GLuint* buffers);
576 }
577 version(WebAssembly)
578 {
579     void glDeleteFramebuffer(GLuint framebuffer);
580     void glDeleteFramebuffers (GLsizei n, GLuint* framebuffers)
581     {
582         assert(n == 1, "WebGL only allows deleting 1 framebuffer");
583         glDeleteFramebuffer(*framebuffers);
584         *framebuffers = 0;
585     }
586 }
587 else
588 {
589     void glDeleteFramebuffers (GLsizei n, GLuint* framebuffers);
590 }
591 void glDeleteProgram (GLuint program);
592 version(WebAssembly)
593 {
594     void glDeleteRenderbuffer(GLuint renderbuffer);
595     void glDeleteRenderbuffers (GLsizei n, GLuint* renderbuffers)
596     {
597         assert(n == 1, "WebGL only allows deleting 1 Renderbuffer");
598         glDeleteRenderbuffer(*renderbuffers);
599         *renderbuffers = 0;
600     }
601 }
602 else
603 {
604     void glDeleteRenderbuffers (GLsizei n, GLuint* renderbuffers);
605 }
606 void glDeleteShader (GLuint shader);
607 version(WebAssembly)
608 {
609     void glDeleteTexture(GLuint texture);
610     void glDeleteTextures (GLsizei n, GLuint* textures)
611     {
612         assert(n == 1, "WebGL only allows deleting 1 texture");
613         glDeleteTexture(*textures);
614         *textures = 0;
615     }    
616 }
617 else
618 {
619     void glDeleteTextures (GLsizei n, GLuint* textures);
620 }
621 void glDepthFunc (GLenum func);
622 void glDepthMask (GLboolean flag);
623 void glDepthRangef (GLfloat n, GLfloat f);
624 void glDetachShader (GLuint program, GLuint shader);
625 void glDisable (GLenum cap);
626 void glDisableVertexAttribArray (GLuint index);
627 void glDrawArrays (GLenum mode, GLint first, GLsizei count);
628 void glDrawElements (GLenum mode, GLsizei count, GLenum type, void* indices);
629 void glEnable (GLenum cap);
630 void glEnableVertexAttribArray (GLuint index);
631 void glFinish ();
632 void glFlush ();
633 void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
634 void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
635 void glFrontFace (GLenum mode);
636 version(WebAssembly)
637 {
638     GLuint glCreateBuffer();
639     void glGenBuffers (GLsizei n, GLuint* buffers)
640     {
641         assert(n == 1, "Can't create more than one buffer on wasm");
642         *buffers = glCreateBuffer();
643     }
644 }
645 else
646 {
647     void glGenBuffers (GLsizei n, GLuint* buffers);
648 }
649 void glGenerateMipmap (GLenum target);
650 version(WebAssembly)
651 {
652     GLuint glCreateFramebuffer();
653     GLuint glCreateRenderbuffer();
654 
655     void glGenFramebuffers (GLsizei n, GLuint* framebuffers)
656     {
657         assert(n == 1, "WebGL can only create 1 framebuffer per time");
658         *framebuffers = glCreateFramebuffer();
659     }
660     void glGenRenderbuffers (GLsizei n, GLuint* renderbuffers)
661     {
662         assert(n == 1, "WebGL can only create 1 renderbuffer per time");
663         *renderbuffers = glCreateRenderbuffer();
664     }
665 }
666 else
667 {
668     void glGenFramebuffers (GLsizei n, GLuint* framebuffers);
669     void glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
670 }
671 version(WebAssembly)
672 {
673     GLuint glCreateTexture ();
674     void glGenTextures (GLsizei n, GLuint* textures)
675     {
676         assert(n == 1, "WebGL only allows generating 1 texture per time.");
677         *textures = glCreateTexture();
678     }
679 }
680 else
681 {
682     void glGenTextures (GLsizei n, GLuint* textures);
683 }
684 void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
685 void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
686 void glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders);
687 
688 version(WebAssembly)
689 {
690     GLint wglGetAttribLocation (GLuint program, size_t length, const GLchar* name);
691     GLint glGetAttribLocation (GLuint program, const GLchar* name)
692     {
693         size_t length;
694         while(name[length] != 0) length++;
695         return wglGetAttribLocation(program, length, name);
696     }
697 }
698 else
699     GLint glGetAttribLocation (GLuint program, GLchar* name);
700 void glGetBooleanv (GLenum pname, GLboolean* data);
701 void glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
702 GLenum glGetError ();
703 void glGetFloatv (GLenum pname, GLfloat* data);
704 void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
705 version(WebAssembly)
706 {
707     GLint glGetParameter(GLenum pname);
708     void glGetIntegerv (GLenum pname, GLint* data)
709     {
710         *data = glGetParameter(pname);
711     }
712 }
713 else
714 {
715     void glGetIntegerv (GLenum pname, GLint* data);
716 }
717 version(WebAssembly)
718 {
719     GLint glGetProgramParameter (GLuint program, GLenum pname);
720     void glGetProgramiv (GLuint program, GLenum pname, GLint* params)
721     {
722         *params = glGetProgramParameter(program, pname);
723     }
724 }
725 else
726 {
727     void glGetProgramiv (GLuint program, GLenum pname, GLint* params);
728 }
729 void glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
730 void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
731 version(WebAssembly)
732 {
733     GLint glGetShaderParameter(GLuint shader, GLenum pname);
734     void glGetShaderiv (GLuint shader, GLenum pname, GLint* params)
735     {
736         *params = glGetShaderParameter(shader, pname);
737     }
738 }
739 else
740 {
741     void glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
742 }
743 version(WebAssembly)
744 {
745     /**
746     *   After deep thought, I think calling wglGetShaderInfoLog the best thing to do.
747     *   That way, memory can be safely freed.
748     */
749     ubyte* wglGetShaderInfoLog(GLuint shader);
750     extern(C) void glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog)
751     {
752         ubyte* _temp = wglGetShaderInfoLog(shader);
753         size_t _tempLen = *cast(size_t*)_temp;
754         string temp = cast(string)_temp[size_t.sizeof.._tempLen+size_t.sizeof];
755 
756 
757         if(length !is null)
758             *length = temp.length;
759         if(temp.length < bufSize)
760             infoLog[0..temp.length] = temp[];
761         else
762             infoLog[0..bufSize] = temp[0..bufSize];
763     }
764 
765 }
766 else
767 {
768     void glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
769 }
770 void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
771 void glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* source);
772 version(WebAssembly)
773 {
774     GLubyte* glGetString (GLenum name)
775     {
776         switch(name)
777         {
778             case GL_RENDERER:
779                 return cast(GLubyte*)"OpenGLES 2.0 emulated by WebGL 1.0(Hipreme Engine)".ptr;
780             case GL_VERSION:
781                 return cast(GLubyte*)"WebGL 1.0".ptr;
782             case GL_SHADING_LANGUAGE_VERSION:
783                 return cast(GLubyte*)"WebGL GLSL 1.0.0".ptr;
784             default:
785             return null;
786         }
787     }
788 }
789 else
790 {
791     GLubyte* glGetString (GLenum name);
792 }
793 void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
794 void glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
795 void glGetUniformfv (GLuint program, GLint location, GLfloat* params);
796 void glGetUniformiv (GLuint program, GLint location, GLint* params);
797 version(WebAssembly)
798 {
799     GLint wglGetUniformLocation(GLuint program, GLuint length, GLchar* name);
800     GLint glGetUniformLocation (GLuint program, GLchar* name)
801     {
802         size_t length = 0;
803         while(name[length++] != '\0'){}
804         assert(length != 0, "Can't send a 0 length string to wglGetUniformLocation");
805         return wglGetUniformLocation(program, length-1, name);
806     }
807 }
808 else
809 {
810     GLint glGetUniformLocation (GLuint program, GLchar* name);
811 }
812 void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
813 void glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
814 void glGetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer);
815 void glHint (GLenum target, GLenum mode);
816 GLboolean glIsBuffer (GLuint buffer);
817 GLboolean glIsEnabled (GLenum cap);
818 GLboolean glIsFramebuffer (GLuint framebuffer);
819 GLboolean glIsProgram (GLuint program);
820 GLboolean glIsRenderbuffer (GLuint renderbuffer);
821 GLboolean glIsShader (GLuint shader);
822 GLboolean glIsTexture (GLuint texture);
823 void glLineWidth (GLfloat width);
824 void glLinkProgram (GLuint program);
825 void glPixelStorei (GLenum pname, GLint param);
826 void glPolygonOffset (GLfloat factor, GLfloat units);
827 void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
828 void glReleaseShaderCompiler ();
829 void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
830 void glSampleCoverage (GLfloat value, GLboolean invert);
831 void glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
832 void glShaderBinary (GLsizei count, GLuint* shaders, GLenum binaryformat, void* binary, GLsizei length);
833 version(WebAssembly)
834 {
835     void wglShaderSource (GLuint shader, GLchar* string_, GLint length);
836     void glShaderSource (GLuint shader, GLsizei count, GLchar** string, GLint* length)
837     {
838         assert(count == 1, "Can't pass more than one string to WebGL glShaderSource.");
839         GLint sourceSize = 0;
840         GLchar* str = *string;
841         if(length != null)
842             sourceSize = *length;
843         else
844         {
845             while(str[sourceSize++] != '\0'){}
846         }
847         //Null character ending is not accepted on firefox.
848         wglShaderSource(shader, str, sourceSize - 1);
849     }
850 }
851 else
852 {
853     void glShaderSource (GLuint shader, GLsizei count, GLchar** string, GLint* length);
854 }
855 void glStencilFunc (GLenum func, GLint ref_, GLuint mask);
856 void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref_, GLuint mask);
857 void glStencilMask (GLuint mask);
858 void glStencilMaskSeparate (GLenum face, GLuint mask);
859 void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
860 void glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
861 void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, void* pixels);
862 void glTexParameterf (GLenum target, GLenum pname, GLfloat param);
863 void glTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
864 void glTexParameteri (GLenum target, GLenum pname, GLint param);
865 void glTexParameteriv (GLenum target, GLenum pname, GLint* params);
866 void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
867 void glUniform1f (GLint location, GLfloat v0);
868 void glUniform1fv (GLint location, GLsizei count, GLfloat* value);
869 void glUniform1i (GLint location, GLint v0);
870 void glUniform1iv (GLint location, GLsizei count, GLint* value);
871 void glUniform2f (GLint location, GLfloat v0, GLfloat v1);
872 void glUniform2fv (GLint location, GLsizei count, GLfloat* value);
873 void glUniform2i (GLint location, GLint v0, GLint v1);
874 void glUniform2iv (GLint location, GLsizei count, GLint* value);
875 void glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
876 void glUniform3fv (GLint location, GLsizei count, GLfloat* value);
877 void glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
878 void glUniform3iv (GLint location, GLsizei count, GLint* value);
879 void glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
880 void glUniform4fv (GLint location, GLsizei count, GLfloat* value);
881 void glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
882 void glUniform4iv (GLint location, GLsizei count, GLint* value);
883 void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
884 void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
885 void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
886 void glUseProgram (GLuint program);
887 void glValidateProgram (GLuint program);
888 void glVertexAttrib1f (GLuint index, GLfloat x);
889 void glVertexAttrib1fv (GLuint index, GLfloat* v);
890 void glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
891 void glVertexAttrib2fv (GLuint index, GLfloat* v);
892 void glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
893 void glVertexAttrib3fv (GLuint index, GLfloat* v);
894 void glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
895 void glVertexAttrib4fv (GLuint index, GLfloat* v);
896 void glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, void* pointer);
897 void glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
898 
899 /* GL_ES_VERSION_2_0 */
900